package flca.mda.api.util;

import mda.type.IApplicationType;


public class FrontendTypeUtils extends TypeUtils {

	protected NameUtils nu = new NameUtils();
	protected InterfaceUtils iu = new InterfaceUtils();
	protected TemplateUtils tplu = new TemplateUtils();
	protected ValidatorUtils vu = new ValidatorUtils();

	/**
	 * return the one class that implements the IApplicationType interface
	 * 
	 * @return
	 */
	public IApplicationType getApplicationType() {
		Object obj = super.getApplicationBaseType();
		if (obj != null && obj instanceof IApplicationType) {
			return (IApplicationType) obj;
		} else {
			if (obj != null) {
				logger.error("You should have one class that extends ApplicationType (and not ApplicationBaseType");
			}
			return null;
		}
	}	
}
